import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;


public class GenSchema {
	public static void main(String[] args) {
		Configuration cf = new Configuration().setProperty("hibernate.dialect", "org.hibernate.dialect.MySQLDialect").
				addResource("mapping.hbm.xml");
		SchemaExport se = new SchemaExport(cf);
		se.setOutputFile("./db/schema.ddl").setDelimiter(";").create(true, false);
	}

}
